WIP: feat: add riscv64 architecture support#231
Draft
vhaudiquet wants to merge 1 commit into
Draft
Conversation
Add riscv64 as a supported image architecture, treating it like arm64
(self-contained runner tarball, no system dotnet needed in the image).
The riscv64 GitHub Actions runner tarball is a self-contained build
produced from the canonical/github-actions-runner fork (with a riscv64
patch) using the community dotnet-sdk-riscv snap at build time. The
produced tarball bundles its own .NET runtime, so — unlike s390x/
ppc64le — no dotnet-runtime apt package is installed in the runner
image and riscv64 is excluded from S390X_PPC64LE_ADDITIONAL_APT_PACKAGES.
Changes:
config.py (app):
- Add RISCV64 to the Arch enum and Arch.to_openstack().
- Add RUNNER_BINARY_REPO_OVERRIDES to publish the runner tarball from
a fork until it is folded into the canonical fork's release pipeline
(riscv64 -> vhaudiquet/actions-runner-riscv).
cloud_image.py (app):
- Map Arch.RISCV64 -> "riscv64" in _get_supported_runner_arch() and
add it to SupportedBaseImageArch.
openstack_builder.py (app):
- _generate_cloud_init_script resolves the runner binary repo via the
per-arch override (falling back to canonical/github-actions-runner).
- Refactor initialize() to iterate over the supported bases, skipping
focal for riscv64 (no riscv64 focal cloud image exists on
cloud-images.ubuntu.com).
state.py (charm):
- Add RISCV64 to the charm-side Arch enum, ARCHITECTURES_RISCV64 set,
and Arch.from_charm().
charmcraft.yaml:
- Document riscv64 in the architecture config option description.
Tests:
- Add riscv64 parametrized cases across the app and charm unit tests.
- Add test_initialize_riscv64_skips_focal covering the focal skip.
Author
|
The main modifications to allow riscv64 support are:
Another challenge is that currently OpenStack does not support riscv64, so the change is hard to test fully. This is still a work in progress and bootstrapping should be the hardest part, once hardware is there we can fully switch to everything supported normally. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add riscv64 as a supported image architecture, treating it like arm64 (self-contained runner tarball, no system dotnet needed in the image).
The riscv64 GitHub Actions runner tarball is a self-contained build produced from the canonical/github-actions-runner fork (with a riscv64 patch) using the community dotnet-sdk-riscv snap at build time. The produced tarball bundles its own .NET runtime, so — unlike s390x/ ppc64le — no dotnet-runtime apt package is installed in the runner image and riscv64 is excluded from S390X_PPC64LE_ADDITIONAL_APT_PACKAGES.
Changes:
Tests:
Rationale
RISCV64 hardware will be coming to Toronto and then PS10. We need all Canonical and other software to be fully supported for this. A lot of software is using GitHub runners for tests and build. We need to support GitHub runners, but they themselves depend on .NET which depends on hardware builders. So we need to break the chain by bootstrapping something.
Juju Events Changes
None. No Juju events or hooks were modified. The change is internal to the build logic and configuration parsing.
Module Changes
(see full change description above)
Library Changes
None.
Checklist
urgent,trivial,senior-review-required,documentation)app/pyproject.tomlStill WIP, will try to comply with all requirements above